#ifndef LoopBuffer_h__
#define LoopBuffer_h__


class CLoopBuffer
{
public:
	CLoopBuffer(void);
	virtual ~CLoopBuffer(void);

	bool Init(int nSize);
	bool Read(char* pOutBuff, int nSize);
	bool Write(const char* pData, int nSize);
	int PreRead(char cVal);

private:
	char* m_pHead;
	char* m_pTail;
	char* m_pRead;
	char* m_pWrite;
};

#endif // LoopBuffer_h__
